<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateBksTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('bks', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->bigInteger('bk_code');//板块代码
            $table->string('bk_name',20);//板块名称
            //板块数据采集时 已转为整数乘以100， 使用时记得除以100
            $table->bigInteger('bk_ds')->default(0);//板块点数
            $table->bigInteger('bk_ds2')->default(0);//板块当日上涨下跌点数
            $table->bigInteger('bk_ds3')->default(0);//板块当日上涨下跌点数百分比
            $table->string('pinyin',20);//板块名称拼音
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('bks');
    }
}
